<template>
  <div>Home组件

    <el-button @click="loginOut">logout</el-button>
  </div>
</template>
<script>
export default {
  methods: {
    loginOut() {
      window.sessionStorage.removeItem("token");
      this.$message({
        message: "Exit the success !",
        type: "success",
        duration: "2000",
        onClose: () => {
          this.$router.push("/login");
        },
      });
    },
  },
};
</script>
<style lang="less" scoped>
</style>